package com.letme.common.core.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.letme.common.annotation.Excel;
import com.letme.common.core.domain.BaseEntity;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * 产品分类对象 business_classification
 *
 * @author lock
 * @date 2024-12-17
 */
@Data
public class MallClassification extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 分类编号 */
    @TableId(value = "class_id", type = IdType.AUTO)
    private Long classId;

    /** 部门编号 */

    @Excel(name = "部门编号")
    private Long deptId;

    @TableField(exist = false)
    @Excel(name = "部门名称")
    private String deptName;

    /** 父分类编号 */
    @Excel(name = "父分类编号")
    private Long parentId;

    /** 排序 */
    private Integer sort;


    /** 分类名称 */

    @Excel(name = "分类名称")
    private String typeName;

    /** 分类banner图 */

    @Excel(name = "分类banner图")
    private String typeImg;

    /** 是否删除（0正常，1删除） */
    private Integer delFlag;

    @TableField(exist = false)
    private List<MallClassification> children = new ArrayList<>();

    public MallClassification() {
    }

    public MallClassification(Long classId, String typeName) {
        this.classId = classId;
        this.typeName = typeName;
    }
}
